Repetier-Firmware  1.0.0
Commands.h
Go to the documentation of this file.
1 /*
2  This file is part of Repetier-Firmware.
3 
4  Repetier-Firmware is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  Repetier-Firmware is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with Repetier-Firmware. If not, see <http://www.gnu.org/licenses/>.
16 
17  This firmware is a nearly complete rewrite of the sprinter firmware
18  by kliment (https://github.com/kliment/Sprinter)
19  which based on Tonokip RepRap firmware rewrite based off of Hydra-mmm firmware.
20 
21  Functions in this file are used to communicate using ascii or repetier protocol.
22 */
23 
24 #ifndef COMMANDS_H_INCLUDED
25 #define COMMANDS_H_INCLUDED
26 
27 class Commands
28 {
29 public:
30  static void commandLoop();
31  static void checkForPeriodicalActions(bool allowNewMoves);
32  static void processArc(GCode *com);
33  static void processGCode(GCode *com);
34  static void processMCode(GCode *com);
35  static void executeGCode(GCode *com);
36  static void waitUntilEndOfAllMoves();
37  static void waitUntilEndOfAllBuffers();
38  static void printCurrentPosition();
39  static void printTemperatures(bool showRaw = false);
40  static void setFanSpeed(int speed, bool immediately = false);
41  static void setFan2Speed(int speed);
42  static void changeFeedrateMultiply(int factorInPercent);
43  static void changeFlowrateMultiply(int factorInPercent);
44  static void reportPrinterUsage();
45  static void emergencyStop();
46  static void checkFreeMemory();
47  static void writeLowestFreeRAM();
48 private:
49  static int lowestRAMValue;
50  static int lowestRAMValueSend;
51 };
52 
53 #endif // COMMANDS_H_INCLUDED
static void commandLoop()
Definition: Commands.cpp:28
static void processGCode(GCode *com)
Execute the G command stored in com.
Definition: Commands.cpp:884
static void processMCode(GCode *com)
Execute the G command stored in com.
Definition: Commands.cpp:1493
Definition: gcode.h:91
static void setFan2Speed(int speed)
Set fan speed 0..255.
Definition: Commands.cpp:257
static void reportPrinterUsage()
Definition: Commands.cpp:265
static void changeFeedrateMultiply(int factorInPercent)
Set fan speed 0..255.
Definition: Commands.cpp:214
static void printCurrentPosition()
Definition: Commands.cpp:135
static void waitUntilEndOfAllBuffers()
Definition: Commands.cpp:106
static void processArc(GCode *com)
Execute the Arc command stored in com.
Definition: Commands.cpp:768
static void waitUntilEndOfAllMoves()
Waits until movement cache is empty.
Definition: Commands.cpp:94
static void writeLowestFreeRAM()
Definition: Commands.cpp:2671
static int lowestRAMValue
Definition: Commands.h:49
static void printTemperatures(bool showRaw=false)
Definition: Commands.cpp:157
static void emergencyStop()
Definition: Commands.cpp:2625
Definition: Commands.h:27
static void checkForPeriodicalActions(bool allowNewMoves)
Definition: Commands.cpp:61
static void changeFlowrateMultiply(int factorInPercent)
Definition: Commands.cpp:222
static void checkFreeMemory()
Definition: Commands.cpp:2665
static void setFanSpeed(int speed, bool immediately=false)
Definition: Commands.cpp:240
static void executeGCode(GCode *com)
Execute the command stored in com.
Definition: Commands.cpp:2583
static int lowestRAMValueSend
Definition: Commands.h:50